package com.training.java.core.homework04;

/**
 * Laptop program
 * 
 * @author Shovan
 * 
 */
public class LaptopDemo {

	public static void main(String[] args) {

		Laptop laptop = new Laptop("LENOVO-2420106");
		System.out.println("");

		if (!laptop.isPowerOn()) {
			laptop.start();
		}
		System.out.println(laptop.getSerialNumber() + " is started... .");

		System.out.println("I will upgrade laptop, so I'll switch off laptop");
		if (laptop.isPowerOn()) {
			laptop.stop();
		}

		System.out.println("");

		System.out.println(laptop.getSerialNumber() + " is upgrading... .");

		laptop.upgrade(laptop.getMaxMemory() + 40,
				laptop.getMaxDiskCapacity() + 400);
		if (!laptop.isPowerOn()) {
			laptop.start();
		}
		System.out.println(laptop.getSerialNumber()
				+ " boooted after upgrade, I'll shutdown for the day.");
		if (laptop.isPowerOn()) {
			laptop.stop();
		}

	}

}
